<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>
	
	<link rel="stylesheet" type="text/css" href="/css/common.css">

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="/js/utility/common_util.js"></script>
	<script src="/js/common_basic.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
		});
		
		function openChangePackage(user_id) {
			openPopup('/member/member/change_package?user_id='+user_id,460,500);
		}

		function openMemberHistory(user_id) {
			openPopup('/member/member/member_history?user_id='+user_id,800,600);
		}
	</script>
</head>
<body>
<div id="wrap">
	<!-- Header -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/header.php'; ?>
	<!--// Header -->
	
	<!-- Contents -->
	<div id="content">
		<h2>VIP회원관리 - 리스트</h2>
		<div>
			<table class="basicTable" width="100%" cellpadding="2" cellspacing="1" border="0">
				<thead>
					<tr>
						<th>가입일</th>
						<th>회원아이디</th>
						<th>이름</th>
						<th>가입상품</th>
						<th colspan="2">유효기간</th>
						<th>포인트</th>
						<th>캐쉬</th>
						<th>이메일</th>
						<th>연락처</th>
						<th>별명</th>
						<th>성별</th>
						<th>생년월일</th>
						<!--th colspan="2">최종접속정보</th-->
						<th>VIP상태</th>
						<th>활동이력</th>
					</tr>
				</thead>
				<tbody>
<?	foreach ($member_list as $items) : ?>
					<tr>
						<td align="center"><?=substr($items['create_dt'],0,10)?></td>
						<td align="center"><?=$items['user_id'];?></td>
						<td align="center"><?=$items['user_name'];?></td>
						<td align="center"><?=$items['package_name'];?></td>
						<td align="center"><?=substr($items['start_dt'],0,4)?>-<?=substr($items['start_dt'],4,2)?>-<?=substr($items['start_dt'],6,2)?></td>
						<td align="center"><?=substr($items['end_dt'],0,4)?>-<?=substr($items['end_dt'],4,2)?>-<?=substr($items['end_dt'],6,2)?></td>
						<td align="right"><?=number_format($items['point'])?></td>
						<td align="right"><?=number_format($items['cash'])?></td>
						<td align="center"><?=$items['email'];?></td>
						<td align="center"><?=$items['cellphone'];?></td>
						<td align="center"><?=$items['nickname'];?></td>
						<td align="center"><?=$items['sex'] == 'M' ? '남' : '여';?></td>
						<td align="center"><?=$items['birthdate'];?></td>
						<!--td align="center"><?=$items['login_dt'];?></td>
						<td align="center"><?=$items['login_ip'];?></td-->
						<td align="center"><button onclick="openChangePackage('<?=$items['user_id']?>')">조회/업그레이드</button></td>
						<td align="center"><button onclick="openMemberHistory('<?=$items['user_id']?>')">조회</button></td>
					</tr>
<?	endforeach ?>
				</tbody>
			</table>
		</div>
	</div>
	<!--// Contents -->
	
	<!-- Footer -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/footer.php'; ?>
	<!--// Footer -->
</div>
</body>
</html>